﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharpMUD.Framework.Security
{
    public interface IUser
    {
        //
        // Summary:
        //     Gets the date and time when the user was added to the membership data store.
        //
        // Returns:
        //     The date and time when the user was added to the membership data store.
        DateTime CreationDate { get; }
        //
        // Summary:
        //     Gets or sets the e-mail address for the membership user.
        //
        // Returns:
        //     The e-mail address for the membership user.
        string Email { get; set; }
        //
        // Summary:
        //     Gets or sets whether the membership user can be authenticated.
        //
        // Returns:
        //     true if the user can be authenticated; otherwise, false.
        bool IsApproved { get; set; }
        //
        // Summary:
        //     Gets a value indicating whether the membership user is locked out and unable
        //     to be validated.
        //
        // Returns:
        //     true if the membership user is locked out and unable to be validated; otherwise,
        //     false.
        bool IsLockedOut { get; }
        //
        // Summary:
        //     Gets whether the user is currently online.
        //
        // Returns:
        //     true if the user is online; otherwise, false.
        bool IsOnline { get; }
        //
        // Summary:
        //     Gets or sets the date and time when the membership user was last authenticated
        //     or accessed the application.
        //
        // Returns:
        //     The date and time when the membership user was last authenticated or accessed
        //     the application.
        DateTime LastActivityDate { get; set; }
        //
        // Summary:
        //     Gets the most recent date and time that the membership user was locked out.
        //
        // Returns:
        //     A System.DateTime object that represents the most recent date and time that
        //     the membership user was locked out.
        DateTime LastLockoutDate { get; }
        //
        // Summary:
        //     Gets or sets the date and time when the user was last authenticated.
        //
        // Returns:
        //     The date and time when the user was last authenticated.
        DateTime LastLoginDate { get; set; }
        //
        // Summary:
        //     Gets the date and time when the membership user's password was last updated.
        //
        // Returns:
        //     The date and time when the membership user's password was last updated.
        DateTime LastPasswordChangedDate { get; }
        //
        // Summary:
        //     Gets the password question for the membership user.
        //
        // Returns:
        //     The password question for the membership user.
        string PasswordQuestion { get; }
        //
        // Summary:
        //     Gets the name of the membership provider that stores and retrieves user information
        //     for the membership user.
        //
        // Returns:
        //     The name of the membership provider that stores and retrieves user information
        //     for the membership user.
        string ProviderName { get; }
        //
        // Summary:
        //     Gets the user identifier from the membership data source for the user.
        //
        // Returns:
        //     The user identifier from the membership data source for the user.
        object ProviderUserKey { get; }
        //
        // Summary:
        //     Gets the logon name of the membership user.
        //
        // Returns:
        //     The logon name of the membership user.
        string UserName { get; }

        // Summary:
        //     Updates the password for the membership user in the membership data store.
        //
        // Parameters:
        //   oldPassword:
        //     The current password for the membership user.
        //
        //   newPassword:
        //     The new password for the membership user.
        //
        // Returns:
        //     true if the update was successful; otherwise, false.
        bool ChangePassword(string oldPassword, string newPassword);
        //
        // Summary:
        //     Updates the password question and answer for the membership user in the membership
        //     data store.
        //
        // Parameters:
        //   password:
        //     The current password for the membership user.
        //
        //   newPasswordQuestion:
        //     The new password question value for the membership user.
        //
        //   newPasswordAnswer:
        //     The new password answer value for the membership user.
        //
        // Returns:
        //     true if the update was successful; otherwise, false.
        bool ChangePasswordQuestionAndAnswer(string password, string newPasswordQuestion, string newPasswordAnswer);
        //
        // Summary:
        //     Gets the password for the membership user from the membership data store.
        //
        // Returns:
        //     The password for the membership user.
        string GetPassword();
        //
        // Summary:
        //     Gets the password for the membership user from the membership data store.
        //
        // Parameters:
        //   passwordAnswer:
        //     The password answer for the membership user.
        //
        // Returns:
        //     The password for the membership user.
        string GetPassword(string passwordAnswer);
        //
        // Summary:
        //     Resets a user's password to a new, automatically generated password.
        //
        // Returns:
        //     The new password for the membership user.
        string ResetPassword();
        //
        // Summary:
        //     Resets a user's password to a new, automatically generated password.
        //
        // Parameters:
        //   passwordAnswer:
        //     The password answer for the membership user.
        //
        // Returns:
        //     The new password for the membership user.
        string ResetPassword(string passwordAnswer);
        //
        // Summary:
        //     Returns the user name for the membership user.
        //
        // Returns:
        //     The System.Web.Security.MembershipUser.UserName for the membership user.
        string ToString();
        //
        // Summary:
        //     Clears the locked-out state of the user so that the membership user can be
        //     validated.
        //
        // Returns:
        //     true if the membership user was successfully unlocked; otherwise, false.
        bool UnlockUser();
    }
}
